#include <iostream>
#include <iterator>
#include <array>

using namespace std;

int main(void)
{
	array<int, 10> a1;
	int i;

#if 0
	for (i = 0; i < a1.size(); i++) {
		a1[i] = i + 1;
	}
#endif

	// 迭代器
	i = 1;
	for (array<int, 10>::iterator it = a1.begin(); it != a1.end(); it++) {
		*it = i + 1;
		i++;
	}

	for (auto it = a1.begin(); it != a1.end(); it ++)
		cout << *it << " ";
	cout << endl;

	// cout << a1.at(100) << endl;

	return 0;
}

